package com.lagou.edu.mvcframework.interceptor;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author: wudong
 * @create: 2021-06-21 15:14
 **/
public class InterceptorRegistry {
    private List<HandlerInterceptor> interceptors = new ArrayList<>();

    public void registerInterceptor(HandlerInterceptor handlerInterceptor){
        interceptors.add(handlerInterceptor);
    }


    public List<HandlerInterceptor> getInterceptors(){
        return Collections.unmodifiableList(interceptors);
    }
}
